package com.qingke.blog.pojo;

import java.util.Date;

public class Article {
	private int id;
	private String articleName;
	private Date newstime;
	private String contentPath;
	private int userId;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getArticleName() {
		return articleName;
	}
	public void setArticleName(String articleName) {
		this.articleName = articleName;
	}
	public Date getNewstime() {
		return newstime;
	}
	public void setNewstime(Date newstime) {
		this.newstime = newstime;
	}
	public String getContentPath() {
		return contentPath;
	}
	public void setContentPath(String contentPath) {
		this.contentPath = contentPath;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	@SuppressWarnings("deprecation")
	public String getMonth(){
		String month="";
		switch(newstime.getMonth()){
		case 0:
			month="Jan";
			break;
		case 1:
			month="Feb";
			break;
		case 2:
			month="Mar";
			break;
		case 3:
			month="Apr";
			break;
		case 4:
			month="May";
			break;
		case 5:
			month="Jun";
			break;
		case 6:
			month="Jul";
			break;
		case 7:
			month="Aug";
			break;
		case 8:
			month="Sep";
			break;
		case 9:
			month="Oct";
			break;
		case 10:
			month="Nov";
			break;
		case 11:
			month="Dec";
			break;
		}
		return month;
	}
	
	@SuppressWarnings("deprecation")
	public int getDate(){
		return newstime.getDate();
	}
	
	@SuppressWarnings("deprecation")
	public int getYear(){
		return 1900+newstime.getYear();
	}
}
